// TOWN SCRIPT
//    Town 2: Small town

// This is the special encounter script for this town.
// The states INIT_STATE, EXIT_STATE, and START_STATE have
// meanings that are described in the documenation. States you write
// yourself should be numbered from 10-100.

begintownscript;

variables;

short i,j,k,r1,choice;

body;

beginstate INIT_STATE;
	change_blocked(11,10,1);
break;

beginstate EXIT_STATE;
// Always called when the town is left.
break;

beginstate START_STATE;
// This state is called every turn the party is in this town.
break;

beginstate 10;
	move_to_new_town(3,8,8);
break;

beginstate 11;
	if (get_flag(1,2) == 250)
		end();
	reset_dialog();
	add_dialog_str(0,"2.",0);
	add_dialog_str(1,"You are in a small town. Point B is in front of you. The direct route to Point B is obstructed. You must reach Point B.",0);
	add_dialog_choice(0,"OK.");
	choice = run_dialog(1);
	set_flag(1,2,250);
break;